<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增产品上架信息')" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-pushInfo-add">

            <div class="form-group">
                <label class="col-sm-3 control-label is-required">产品名称：</label>
                <div class="col-sm-8">
                    <select name="prodId" class="form-control">
                        <option th:each="item:${prodInfoList}" th:text="${item.prodName}" th:value="${item.prodId}"></option>
                    </select>
                </div>
            </div>

            <div class="form-group">    
                <label class="col-sm-3 control-label">排序权重：</label>
                <div class="col-sm-8">
                    <input name="sortWeight" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">场景信息：</label>
                <div class="col-sm-8">
                    <label class="check-box" th:each="item:${sceneInfoList}">
                        <input type="checkbox" name="sceneIds" th:value="${item.value}" th:text="${item.name}"></label>
                    </label>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
        var prefix = ctx + "prod/pushInfo"
        $("#form-pushInfo-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-pushInfo-add').serialize());
            }
        }
    </script>
</body>
</html>